package com.zxhysy.log.annotation.filter;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ser.BeanPropertyWriter;
import com.fasterxml.jackson.databind.ser.PropertyWriter;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.zxhysy.log.annotation.LogIgnore;

/**
 * 自定义注解
 *
 * @author 工作电脑
 * @date 2023/5/30 15:22:55
 */
public class CustomExceptFilter extends SimpleBeanPropertyFilter {

    @Override
    protected boolean include(BeanPropertyWriter writer) {
        LogIgnore annotation = writer.findAnnotation(LogIgnore.class);
        return annotation == null;
    }

    @Override
    protected boolean include(PropertyWriter writer) {
        LogIgnore annotation = writer.findAnnotation(LogIgnore.class);
        return annotation == null;
    }

}
